<?php
	class OfficelistAction extends BaseAction{
		public function index(){
			$id = $_GET['x_id'];
			$result =M("xiezilou")->join("vip ON vip.v_id = xiezilou.x_broker")->where("x_id=$id")->join("district ON district.d_id = xiezilou.x_district")->select();
			//var_dump($result);exit;
			$v_id = $result['0']['v_id'];
			$x_name = $result['0']['x_name'];

			$rent = M("xiezilou")->where("x_broker=$v_id")->limit("15")->field("x_name,x_d_rent,x_id")->select();
			$this->assign("rent",$rent);
			//var_dump($rent);exit;
			$newtj = M("xiezilou")->where("is_jingpin")->order("x_id desc")->limit(15)->field("x_name,x_d_rent,x_id")->select();

			$lou = M("xiezilou")->where("x_name = '$x_name'")->select();
			$this->assign("lou",$lou);
			$this->assign("result",$result);
			$this->assign("newtj",$newtj);
			//var_dump($newtj);exit;
			$this->display();
		}
	
	}
?>